<?php

/**
 * Fixture form base class.
 *
 * @method Fixture getObject() Returns the current form's model object
 *
 * @package    prode
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseFixtureForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'           => new sfWidgetFormInputHidden(),
      'anho'         => new sfWidgetFormInputText(),
      'torneo_id'    => new sfWidgetFormPropelChoice(array('model' => 'Torneo', 'add_empty' => false)),
      'temporada_id' => new sfWidgetFormPropelChoice(array('model' => 'Temporada', 'add_empty' => false)),
      'fechanro'     => new sfWidgetFormInputText(),
      'activo'       => new sfWidgetFormInputCheckbox(),
      'finalizado'   => new sfWidgetFormInputCheckbox(),
    ));

    $this->setValidators(array(
      'id'           => new sfValidatorPropelChoice(array('model' => 'Fixture', 'column' => 'id', 'required' => false)),
      'anho'         => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'torneo_id'    => new sfValidatorPropelChoice(array('model' => 'Torneo', 'column' => 'id')),
      'temporada_id' => new sfValidatorPropelChoice(array('model' => 'Temporada', 'column' => 'id')),
      'fechanro'     => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'activo'       => new sfValidatorBoolean(array('required' => false)),
      'finalizado'   => new sfValidatorBoolean(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('fixture[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Fixture';
  }


}
